<template>
  <van-overlay style="background: none" :show="show">
    <van-toast v-model:show="show">
      <template #message>
        <div style="padding: 10px 0">
          <van-loading type="spinner" size="24px"/>
          <div style="margin-top: 10px">
            加载中...
          </div>
        </div>
      </template>
    </van-toast>
  </van-overlay>
</template>
<script lang="ts" setup>
import {shallowRef} from "vue";

const show = shallowRef(true);
defineOptions({
  name: 'PageLoading'
})

const eimts = defineEmits(['close']);
defineExpose({
  close() {
    eimts('close');
  },
})
</script>